-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add builder system transactions #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Forge code coverage:
|
src/BuilderSystemTransactions.sol
Outdated
/// @notice Sets the flashblock index | ||
/// @dev Only a builder can set the flashblock index | ||
/// @param _flashblockIndex The new flashblock index | ||
function setFlashblockIndex(uint8 _flashblockIndex) external onlyBuilder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we include some basic verification here just to be safe? A simple version would be one where you can only increment by one or reset to zero (which should also require that the block number has increased by one), or a more sophisticated version would allow the owner to update a flashblocks-per-block variable and then that gets stepped through.
I would just worry as an app dev about relying on the builder to always operate with perfect accuracy, particularly if my application was counting on the "flashblocks always increase" invariant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even if they do operate with perfect accuracy, it's a great way to communicate the intended behavior
this commit updates the flashblock logic to increment rather than set arbitrarily
3c8bc8c
to
9a0bbce
Compare
Pull Request
Description
Please include a summary of the change and which feature was implemented or which issue was fixed. Also, include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Checklist:
Before deployment
After deployment
Considerations
forge fmt
and prettier to ensure the code style is validAdditional context
Add any other context about the pull request here.